<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="Refresh" Content="<?php echo $time+10; ?>; url=">
        <title>Hãy đợi...</title>
        <style type="text/css">
            .floodblocker {
                font: normal 14px / 25px Arial, Helvetica, sans-serif;
                margin: 50px;
                padding: 50px;
                text-align: center
            }
            
            .floodblocker span {
                font: bold 14px / 25px Arial, Helvetica, sans-serif;
            }
            
            #secField {
                color: #FF5B0D;
                font: bold 18px / 25px Arial, Helvetica, sans-serif
            }
        </style>
    </head>
    <body>
		<div class="floodblocker">
			<br/>
			<span id="notice"><b><?php echo $msg; ?></span><br />
			<br/>
			<img alt="Hãy đợi..." src="http://nuke-viet.googlecode.com/svn/trunk/nukeviet/images/load_bar.gif" width="33" height="8" />
			<br/>
			<span>Hãy đợi <span id="secField"><?php echo $time; ?></span> giây...</span>
		</div>
        <script type="text/javascript">
            var Timeout = '<?php echo $time; ?>';
            var timeBegin = new Date();
            var msBegin = timeBegin.getTime();
            function showSeconds(){
                var timeCurrent = new Date();
                var msCurrent = timeCurrent.getTime();
                var ms = Math.round((msCurrent - msBegin) / 1000);
                document.getElementById('secField').innerHTML = Timeout - ms;
				if (ms >= <?php echo $time-1; ?>){
					document.getElementById('notice').innerHTML = "<b>Bạn có thể truy cập lại</b>";
				}
                if (Timeout <= ms) 
                    location.reload();
            }
            
            timerID = setInterval("showSeconds()", 1000);
        </script>
    </body>
</html>
